import { createStore } from 'vuex';

export default createStore({
  state: {
    user: null
  },
  mutations: {
    SET_USER(state, user) {
      state.user = user
    }
  },
  actions: {
    login({ commit }, user) {
      // 这里可以添加实际的登录逻辑
      commit('SET_USER', user)
      return Promise.resolve()
    }
  }
}) 